﻿<Window x:Class="delitel.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:VM="clr-namespace:delitel.ViewModel"
        mc:Ignorable="d"
        Title="делитель"    
        x:Name="MainView" 
        Height="1000"
        Width="1700"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent" ResizeMode="CanResizeWithGrip"  >
    
    <Window.DataContext>
        <VM:MainWindowsViewModel/>
    </Window.DataContext>
    
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="truevid"/>
    </Window.Resources>


    <Grid>

        <Border Style="{StaticResource BackgroundStyle}">
            <Grid Margin="0,73,0,0">
                <Frame Content="{Binding Page, UpdateSourceTrigger=PropertyChanged}" NavigationUIVisibility="Hidden"  Width="1600"/>
            </Grid>
        </Border>

        <Button Command="{Binding OpenMenu}"
            Style="{StaticResource MenuBtnStyle}"/>

        <Border   Style="{StaticResource PanelStyle}"
                  Visibility="{Binding Visibility,  Converter={StaticResource truevid}, UpdateSourceTrigger=PropertyChanged}">
            <StackPanel>
                <Button Command="{Binding CloseMenu, UpdateSourceTrigger=PropertyChanged}" 
                Style="{StaticResource ClosePanelStyle}"/>
                <ScrollViewer>
                    <Expander Header="делители напряжения">
                        <StackPanel>

                            <WrapPanel>


                                <Button Content="резисторы"  Command="{Binding OpenPageResistorCommand, UpdateSourceTrigger=PropertyChanged}"/>

                            </WrapPanel>

                            <WrapPanel>


                                <Button Content="конденцаторы"  />

                            </WrapPanel>

                            <WrapPanel>


                                <Button Content="катушки"  />

                            </WrapPanel>
                            <WrapPanel>


                                <Button Content="смешаный"  />

                            </WrapPanel>
                        </StackPanel>
                    </Expander>

                </ScrollViewer>



            </StackPanel>
        </Border>
        
        <Button Style="{StaticResource  CloseAppStyle}" Command="{Binding CloseCommand, UpdateSourceTrigger=PropertyChanged}"/>




    </Grid>
   
</Window>
